package com.glsc.ngateway.common.base.domainmapper;

import com.glsc.ngateway.common.base.domain.mysql.cmdb.CmdbMemoryStandard;
import com.glsc.ngateway.common.base.dto.cmdb.CmdbMemoryStandardImportDto;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(componentModel = "spring")
public interface CmdbMemoryStandardMapper {
    CmdbMemoryStandardMapper INSTANCE = Mappers.getMapper(CmdbMemoryStandardMapper.class);

    //    @Mapping(target = "isDelete", ignore = true)
    CmdbMemoryStandardImportDto domain2dto(CmdbMemoryStandard cmdbMemoryStandard);

    List<CmdbMemoryStandardImportDto> domain2dto(List<CmdbMemoryStandard> cmdbMemoryStandards);


    @Mapping(target = "id", ignore = true)
    @Mapping(target = "memoryStandardCode", ignore = true)
    @Mapping(target = "isDelete", ignore = true)
    CmdbMemoryStandard dto2domain(CmdbMemoryStandardImportDto cmdbMemoryStandardImportDto);

    List<CmdbMemoryStandard> dto2domain(List<CmdbMemoryStandardImportDto> cmdbMemoryStandardImportDtos);
}
